<?php 

include_once __DIR__ . '/../vendor/autoload.php';
include_once __DIR__ . '/../db.php';

$id = $_GET['id'];
if($id) {
    $data = \Data::find($id);
    $data->delete();
}

echo"<script>alert('操作成功');window.location=document.referrer;</script>";
